#ifndef IDOXYGENPARSER_H
#define IDOXYGENPARSER_H

#include <QStringList>
#include <QPointer>
#include <QObject>
#include <RefrenceItem.h>

#include "IDoxyFile.h"
#include "IDoxyClass.h"
/**
 * @brief The IDoxygenParser class provides a mechanism for processing the xml generated from doxygen, creating a simple internal
 *tree structure of the data held in the files, each file is loaded into to memmory at a time.
 */
class IDoxygenParser : public QObject
{
public:

    virtual bool loadIndexFile(const QString fileName) = 0;

    /**
     * @brief getFileNames Poulates the given string list with all of the files that have been processed via doxygen
     * @param FileNames A list of the file names that have been proccessed.
     */
    virtual void getFileNames(QList<RefItem>& FileNames) const = 0;

    /**
    * @brief getClassNames Gets a list of all the classes that have been loaded by doxygen
    * @param ClassNames  A list that will be populated with all of the class names
    */
   virtual void getClassNames(QList<RefItem>& ClassNames) const = 0;

    /**
    * @brief loadFile Only one file can be loaded at a time after another load the previous pointer will be invalidated
    * @param refId The refrence id of the file to load
    * @return A doxy file representation of the class if can be loaded, otherwise a null pointer is returned.
    */
    virtual const IDoxyFile* loadFile(QString refId) = 0;

    /**
     * @brief loadClass Load a class processed by doxygen. Note that only one class may be loaded at a time. Another load will cause the previous class to be disposed of
     * @param refId The refrence id of the class to load
     * @return A doxy representation of a class that has been processed, if NUll is returned a file has failed to be loaded.
     */
    virtual const IDoxyClass* loadClass(QString refId) = 0;
};

#endif // IDOXYGENPARSER_H
